package com.soso.dao;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.soso.entity.Users;

public interface Userroles extends JpaRepository<com.soso.entity.Userroles, Integer> {
	//查询所有
	@Query(value="select * from userroles where UserId=?1",nativeQuery = true)
	 public List<com.soso.entity.Userroles> getallss(String UserId);
	
	//查询所有
	@Transactional
	@Modifying
	@Query(value="delete from userroles where UserId=?1 and RoleId=?2",nativeQuery = true)
	 public Integer dels(String UserId,String RoleId);
}
